/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bill.bikes;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Aganguly
 */
@Entity
@Table(name = "billrecords")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Billrecords.findAll", query = "SELECT b FROM Billrecords b"),
    @NamedQuery(name = "Billrecords.findByOrderId", query = "SELECT b FROM Billrecords b WHERE b.orderId = :orderId"),
    @NamedQuery(name = "Billrecords.findByBillId", query = "SELECT b FROM Billrecords b WHERE b.billId = :billId"),
    @NamedQuery(name = "Billrecords.findByBillDate", query = "SELECT b FROM Billrecords b WHERE b.billDate = :billDate"),
    @NamedQuery(name = "Billrecords.findByStatus", query = "SELECT b FROM Billrecords b WHERE b.status = :status")})
public class Billrecords implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "OrderId")
    private Long orderId;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "BillId")
    private Long billId;
    @Column(name = "BillDate")
    @Temporal(TemporalType.DATE)
    private Date billDate;
    @Column(name = "Status")
    private String status;

    public Billrecords() {
    }

    public Billrecords(Long billId) {
        this.billId = billId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getBillId() {
        return billId;
    }

    public void setBillId(Long billId) {
        this.billId = billId;
    }

    public Date getBillDate() {
        return billDate;
    }

    public void setBillDate(Date billDate) {
        this.billDate = billDate;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (billId != null ? billId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Billrecords)) {
            return false;
        }
        Billrecords other = (Billrecords) object;
        if ((this.billId == null && other.billId != null) || (this.billId != null && !this.billId.equals(other.billId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bill.bikes.Billrecords[ billId=" + billId + " ]";
    }
    
}
